<#-- @ftlvariable name="entity" type="com.xci.edu.core.entity.EduPlan" -->
<#include "/sys/_layout.ftl">
<!doctype html>
<html>
<head>
    <@pageHeader/>
</head>
<body>
<@pageLoading/>
<div class="jxpanel winpanel" data-fit="true">
    <form id="editform" class="jxform" method="post"
          action="${saveUrl("/background/eduPlan/","createSave","updateSave")}">
        <input name="id" value="${entity.id}" type="hidden">
        <input name="status" value="${entity.status}" type="hidden">
        <@isEdit><input name="name" value="${entity.name}" type="hidden"></@isEdit>
        <@isEdit><input name="eduCategoryId" value="${entity.eduCategoryId}" type="hidden"></@isEdit>
        <table class="table jxtable-form">

            <tr>
                <th class="w-100px">名称</th>
                <td>
                    <input class="form-control" id="name" name="name" value="${entity.name}" maxlength="50" data-validate="required: [true,'请输入名称']" <@isEdit>disabled="disabled"</@isEdit> autocomplete="off"/>
                </td>
            </tr>
            <tr>
                <th>科目</th>
                <td>
                    <select class="form-control jxselect" name="eduCategoryId" data-text-field="eduCategoryName" data-allow-clear="true" <@isEdit>disabled="disabled"</@isEdit> data-validate="required: [true,'请选择科目']" >
                        <option></option>
                        <@eduCategorySelectOption selectedValue=entity.eduCategoryId></@eduCategorySelectOption>
                    </select>
                </td>
            </tr>
            <tr>
                <th>培训讲师</th>
                <td>
                    <select class="form-control jxselect" id="teacher" name="teacher" data-allow-clear="true">
                        <option></option>
                        <@dicEduPlanTeacherOption selectedValue=entity.teacher/>
                    </select>
                </td>
            </tr>
            <tr>
                <th>培训开始日期</th>
                <td>
                    <div class="input-group date jxdate" data-options="format: 'yyyy-mm-dd'"  >
                        <input id="trainStartDate" name="trainStartDate" class="form-control"
                               value="${(entity.trainStartDate?string("yyyy-MM-dd"))!}"
                               data-validate="required: [true,'请选择培训开始日期']"
                               autocomplete="off">
                        <span class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </span>
                    </div>
                </td>
            </tr>
            <tr>
                <th>培训结束日期</th>
                <td>
                    <div class="input-group date jxdate" data-options="format: 'yyyy-mm-dd'">
                        <input id="trainEndDate" name="trainEndDate" class="form-control"
                               value="${(entity.trainEndDate?string("yyyy-MM-dd"))!}"
                               data-validate="{required: [true,'请选择培训结束日期'],compareEqualDate:'#trainStartDate'}"
                               autocomplete="off">
                        <span class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </span>
                    </div>
                </td>
            </tr>
            <tr>
                <th>计划人数</th>
                <td>
                    <input class="form-control jxnumber" id="planCount" name="planCount" type="number" maxlength="9"
                           data-validate="required: [true,'请输入计划人数']"
                           max="999999999" data-max="999999999" data-min="0"
                           data-decimals="0" data-step="1" value="${entity.planCount}" autocomplete="off"/>
                </td>
            </tr>
            <tr>
                <th>备注</th>
                <td>
                    <textarea class="form-control" name="remark" maxlength="500" rows="3" style="resize: none">${entity.remark}</textarea>
                </td>
            </tr>
        </table>
    </form>
    <div class="panel-footer text-right">
        <@editFormDialogCommand/>
    </div>
</div>
<@editFormPageFooter/>
</body>
</html>
